Unlike “circuit-switched” voice, VoIP needs to work well over changing network conditions—because of competing traffic (e.g. viewing a clip on YouTube), wireless interference etc.
Some audio CODECs—e.g. Opus—support transmitting at different bitrates. In addition to using a multi-rate CODEC, one can also change the bitrate by changing the frame size and switching between CODECs.
Even with a CODEC that supports multiple bitrates (which may include changes to frame-size as above), we are still left with the problem of using the “best” bitrate given the network conditions—which requires measuring network conditions.